<?php
/*
 * @Author: 李志刚
 * @CopyRight: 2020-2030 衡水山木枝技术服务有限公司
 * @Date: 2021-08-28 09:25:28
 * @Description: 租户自己创建的角色表
 * @LastEditors: 李志刚
 * @LastEditTime: 2021-08-28 09:49:49
 * @FilePath: /qingshanERP/database/migrations/qingshanerp/2021_08_28_092528_create_tenant_role.php
 */

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateTenantRole extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('tenant_role', function (Blueprint $table) {
            $table->id();
            $table->foreignId('tenant_id')->default(0)->comment('租户id');
            $table->string('name');
            $table->boolean('status')->default(1)->comment('1 正常，0 禁用');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('tenant_role');
    }
}
